# -*- coding: utf-8 -*-
from redis import Redis


class BaseConfig(object):
    # SESSION_TYPE = 'redis'                                # session类型为redis
    # SESSION_REDIS = Redis(host='127.0.0.1', port=6379)    # redis连接
    SESSION_KEY_PREFIX = 'session'                        # 保存到redis中值的前缀
    # SESSION_PERMANENT = True                              # True会保存31天， 如果设置为False，关闭浏览器session失效
    SESSION_USE_SIGNER = True                            # 是否对发送到浏览器上的session:cookie值进行加密

    SQLALCHEMY_DATABASE_URI = "mysql+pymysql://root:123456@127.0.0.1:3306/blog?charset=utf8mb4"
    SQLALCHEMY_POOL_SIZE = 5
    SQLALCHEMY_POOL_TIMEOUT = 30
    SQLALCHEMY_POOL_RECYCLE = -1
    SQLALCHEMY_TRACK_MODIFICATIONS = False  # 追踪对象的修改并发送信号
    SECRET_KEY='xxxxxxxxxxxxxxxx'

class ProductionConfig(BaseConfig):
    pass


class DevelopmentConfig(BaseConfig):
    pass


class TestingConfig(BaseConfig):
    pass